﻿// -------------------------------------------------------------------------
//    @FileName         :    NFSysMsgUtil.h
//    @Author           :    Gao.Yi
//    @Date             :    2025-10-28
//    @Email			:    445267987@qq.com
//    @Module           :    NFSysMsgUtil
//    @Desc             :
//
// -------------------------------------------------------------------------

#pragma once

#include "proto_cs.pb.h"
#include "NFComm/NFObjCommon/NFObject.h"

class NFPlayer;
class NFSysMsgUtil
{
public:
    static int MakePlayerEscapePara(proto_ff::SysMsgEscapePara& para, uint64_t ullRoleID, const std::string& strName);
    static int MakeIntEscapePara(proto_ff::SysMsgEscapePara& para, int iValue);
    static int MakeULLEscapePara(proto_ff::SysMsgEscapePara& para, uint64_t ullValue);
    static int MakeIDEscapePara(proto_ff::SysMsgEscapePara& para, int iId);
    static int MakeStringEscapePara(proto_ff::SysMsgEscapePara& para,  const std::string& strPara);
public:
    static int MakeMessage(proto_ff::Proto_CSRsp* pRsp, int iId, const std::vector<proto_ff::SysMsgEscapePara>& vecEscapePara);
    static int SendToPlayer(NFPlayer* pPlayer, int iId, const std::vector<proto_ff::SysMsgEscapePara>& vecEscapePara);
    static int Broadcast(int iId);
    static int Broadcast(int iId, const std::vector<proto_ff::SysMsgEscapePara>& vecEscapePara);
    static int Broadcast(proto_ff::SysMsgShowType eShowType, int iShowTime, const std::string& content);
    static int SendSysMsg(NFPlayer *pPlayer, proto_ff::SysMsgShowType eShowType, int iShowTime, const std::string& content, const std::vector<proto_ff::SysMsgEscapePara>& vecEscapePara = std::vector<proto_ff::SysMsgEscapePara>());
};